import request from '../utils/request';
export const userData = query => {
    return request({
        url: '/api/upp/user/doMain',
        method: 'post',
        // url: './json/userlist.json',
        // method: 'get',
        params: query,
    });
};

/*新增用户*/
export const doAdd = query => {
    return request({
        url: '/api/upp/user/doAdd',
        method: 'post',
        // url: './json/hospital/doUserAdd.json',
        // method: 'get',
        data: query,
    });
};

//根据userAcct 判断该用户是否已存在
export const isNotExists = query => {
    return request({
        url: '/api/upp/user/isNotExists',
        method:'post',
        // url:'./json/isNotExists.json',
        // method: 'get',
        params: query
    });
};
//删除用户
export const doDelete = query => {
    return request({
        url: '/api/upp/user/doDelete',
        method:'delete',
        // url: './json/isLogin.json',
        // method: 'get',
        params: query
    });
};
//判断输入密码是否正确
export const isPwdTrue = query => {
    return request({
        url: '/api/upp/user/checkPwd',
        method:'post',
        // url: './json/hospital/doUserAdd.json',
        // method: 'get',
        params: query
    });
};
//修改编辑用户
export const doUpdate = query => {
    return request({
        url: '/api/upp/user/doUpdate',
        method:'post',
        // url: './json/hospital/doUserAdd.json',
        // method: 'get',
        data: query
    });
};
//修改用户密码
export const updatePwd = query => {
    return request({
        url: '/api/upp/user/updatePwd',
        method:'post',
        // url: './json/hospital/doUserAdd.json',
        // method: 'get',
        params: query
    });
};
//重置密码
export const reset = query => {
    return request({
        url: '/api/upp/user/resetPWD',
        method:'post',
        // url: './json/hospital/doUserAdd.json',
        // method: 'get',
        params: query
    });
};

// 根据用户accout 查询用户信息
export const selectByAcct = query => {
    return request({
        url: '/api/upp/user/selectByAcct',
        method:'post',
        // url: './json/user.json',
        // method: 'get',
        params: query
    });
};
